function goToPage(curPage,nextPage){
	var msg;
	if(nextPage<0){
		msg="当前页已经是首页";
	}else{
		msg="当前页已经是尾页";
	}

	var curentPage = nextPage==-2 ? curPage:(curPage+nextPage);
	
 	if(curentPage<=0){
 	 	alert(msg);
 	 	return;
 	}
 	var pageCurent=document.getElementById("page.curentPage").value;
 	if(pageCurent!='' && curentPage==parseInt(pageCurent) ){
 		alert(msg);
		return ;
 	}
 	
 	var totalPages=document.getElementById("page.totalPages").value;
 	if(totalPages!='' && parseInt(totalPages)<curentPage ){
 		alert(msg);
		return ;
 	}
 	
 	var form=document.getElementById("form");
 	document.getElementById("curentPage").value=curentPage;
 	form.submit();
}

function jumpToPage(){
	var jumpPage=document.getElementById("jumpPage").value;
	var totalPages=document.getElementById("page.totalPages").value;
	if(isInteger(jumpPage)){
		var jumpP=parseInt(jumpPage);
 		if(totalPages!='' && parseInt(totalPages)< jumpP){
 			alert("请输入不大于总页数的正整数！");
 			return ;
 	 	}
		goToPage(jumpP,0);
		return ;
 	}
	alert("请输入正整数！");
 	return ;
}